<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" import="java.util.*" %>
<%
String path = request.getContextPath(); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>首页</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<link href="<%=path%>/resources/css/pages/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/resources/script/js/jquery-1.8.0.min.js" ></script>
<script src="<%=path%>/resources/script/js/vue.js"></script>
<script type="text/javascript" src="<%=path%>/resources/script/js/js.js" ></script>
<script type="text/javascript" src="<%=path%>/resources/script/js/jquery.jslides.js"></script>
</head>
<body>
<div id="contentBody">
<div class="top"  id="toubu">
  <div class="top-ct">
   <h3 class="logo"></h3> 
   <span id='span'>
       <a href="<%=path%>/pages/login" id='plogin'><span >您好，请登录！</span></a>
       <a href="<%=path%>/pages/userInfo?userid=${loginUser.id }" id='pshow'><span>${loginUser.nickName}（${loginUser.account }）</span></a>
    </span>
    <p><a href="javascript:void(0);" class="select">首页</a><a href="<%=path%>/pages/mycourse?userid=${loginUser.id}">我的课程</a>
	<a href="<%=path%>/pages/learnhistory?userid=${loginUser.id}">学习历史</a><a href="javascript:void(0);">我的技能</a>
</p> 
    </div>
</div>
<div class="banner">
<div id="full-screen-slider">
	<ul id="slides" style="margin-left: 0;">
		<li style="background:url('<%=path%>/resources/images/pages/images/ban11.jpg') no-repeat center top;background-size: cover;"><a href="javascript:void(0);" target="_blank"></a></li>
		<li style="background:url('<%=path%>/resources/images/pages/images/ban22.jpg') no-repeat center top;background-size: cover;"><a href="javascript:void(0);"  target="_blank"></a></li>
		<li style="background:url('<%=path%>/resources/images/pages/images/ban11.jpg') no-repeat center top;background-size: cover;"><a href="javascript:void(0);"  target="_blank"></a></li>
	
	</ul>
</div>

</div>
<div id="main">
<div class="course">
 <h4><span>新课程开设</span><a href="<%=path%>/pages/mycourse?userid=${loginUser.id}">更多 >></a></h4>
<div v-for="item in courseList" :class="$index%2==0? 'c-left':'c-right'">
 <dl >
   <dt><a href="<%=path%>/pages/subjectdetail.do?id={{item.id}}&userid=${loginUser.id}">
   <img :src="item.image" onerror="javascript:this.src='<%=path%>/resources/images/pages/images/default.png'">
   </a></dt>
   <dd>
     <h3><a href="javascript:void(0);" target="_blank">{{item.name}}</a></h3>
     <p><a href="<%=path%>/pages/subjectdetail.do?id={{item.id}}&userid=${loginUser.id}">{{item.remark}}</a> </p>
   </dd>
 </dl>
</div>
</div>
<div class="news">
 <h4><span>新闻资讯</span><a href="<%=path%>/pages/newsMoreAction">更多 >></a></h4>
 <ul>
   <li v-for="item in newsAdList"><a href="<%=path%>/pages/newsdetail?id={{item.id}}">{{item.title}}</a><span>{{item.createTime.substr(0,10)}}</span></li>
 </ul>
 
</div>
<div class="ad">

 <h4><span>公告信息</span><a href="<%=path%>/pages/noticeMoreAction.do?adType=1">更多 >></a></h4>
 <ul>
   <li v-for="item in collAdList"><a href="<%=path%>/pages/noticeAction.do?id={{item.id}}&adType={{item.nType}}">【{{item.type}}】{{item.title}}</a></li>
 </ul>
</div>

<div class="clear"></div>
</div>
<div class="foot">
<div class="foot-top"></div>
<div class="foot-ct"><p>Copyright © 2016 业主单位：福建工程学院，建设单位：福州森泽信息科技有限公司 技术服务热线：87862229
   <a href="javascript:void(0);"><img src="<%=path%>/resources/images/pages/images/cnzz.jpg"></a></p></div>
</div>
<script src="<%=path%>/resources/script/requestjs/index.js"></script>
<script type="text/javascript"  language="JavaScript">
$(function(){
	var myName='${loginUser.account}';
	if(myName==""||myName==undefined)
	{
		document.getElementById('plogin').setAttribute("style", "display:inline");
		document.getElementById('pshow').setAttribute("style", "display:none");
	}
	else{
		document.getElementById('plogin').setAttribute("style", "display:none");
		document.getElementById('pshow').setAttribute("style", "display:inline");
	}
});
</script>
</div>
</body>
</html>